package org.suk.dp.responsibilityChain.declare;

/**
 * Description: <br/>
 * @version V1.0  2017/6/22 10:04  by 石冬冬(dongdong.shi@ucarinc.com) - Heil Hitler
 */
public class Client {
    public static void main(String[] args) {
        Handler h1 = new ConcreteHandler1();
        Handler h2 = new ConcreteHandler2();
        Handler h3 = new ConcreteHandler3();
        h1.setSuccessor(h2);
        h2.setSuccessor(h3);
        int[] requests = new int[]{2,5,14,22,18,3,27,20};
        for(int request : requests){
            h1.handleRequest(request);
        }
    }
}
